// BaseClass.h: interface for the CBaseClass class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BASECLASS_H__84413E27_A5C9_4365_8D59_95DD602CF9A3__INCLUDED_)
#define AFX_BASECLASS_H__84413E27_A5C9_4365_8D59_95DD602CF9A3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "PlayerFuncManager.h"
class CBaseClass;
#define __super CBaseClass
typedef struct st_BaseClassItem
{
	LONG m_lDlgID;
	LONG m_lItemID;
	CString m_strItemKey;
	CBaseClass* m_lpBaseClass;
	st_BaseClassItem()
	{
		m_lDlgID=0;
		m_lItemID=0;
		m_strItemKey=_T("");
		m_lpBaseClass=NULL; 
	}
	~st_BaseClassItem()
	{
		m_lDlgID=0;
		m_lItemID=0;
		m_strItemKey=_T("");
		if(m_lpBaseClass!=NULL)
		{
			//delete (void *)m_lpBaseClass;
			m_lpBaseClass=NULL;
		}
	}
	st_BaseClassItem& operator=(const st_BaseClassItem src)
	{
		this->m_lDlgID=src.m_lDlgID;
		this->m_lItemID=src.m_lItemID;
		this->m_strItemKey=src.m_strItemKey;
		this->m_lpBaseClass=src.m_lpBaseClass;
		return *this;
	}
	
	st_BaseClassItem& operator=(const st_BaseClassItem* src)
	{
		ASSERT(src==NULL);
		if(this==src) return *this;
		this->m_lDlgID=src->m_lDlgID;
		this->m_lItemID=src->m_lItemID;
		this->m_strItemKey=src->m_strItemKey;
		this->m_lpBaseClass=src->m_lpBaseClass;
		return *this;
	}

}BaseClassItem,*lpBaseClassItem;

class CBaseClass  
{
public:
	CPlayerFuncManager m_PlayerFunc;
	CBaseClass();
	virtual ~CBaseClass()=0;
	BOOL	m_bIsLoaded;
	virtual BOOL ReLoadInfo()
	{
		m_bIsLoaded=TRUE;
		return TRUE;
	};
	virtual BOOL SaveInfo()=0;//{return TRUE;};
	virtual BOOL ShowDlg()=0;//{return TRUE;};
	virtual BOOL HiddenDlg()=0;//{return TRUE;}; 
	virtual BOOL SetDlgItemLanguage(){return TRUE;};
public:
	BOOL SetCommBoxSeleted(CComboBox& box,const CString& strText);
	BOOL SetCommBoxSeleted(CComboBox& box,int iItemData);
	BOOL SetMenuItemText(CMenu* RootMenu,UINT nID, CString strFind,CString strDefaultValue=_T(""));
	BOOL SetDlgItemLanguageText(HWND hDlgHanle,UINT nID, CString strFind,CString strDefaultValue=_T("")); 
};


#endif // !defined(AFX_BASECLASS_H__84413E27_A5C9_4365_8D59_95DD602CF9A3__INCLUDED_)
